package org.openstock.impl.def.core.ui.swing.view;

import java.util.ArrayList;
import java.util.List;

import org.openstock.design.View;
import org.openstock.impl.def.core.ui.swing.wrapper.JComponent;

public abstract class AbstractSwingView<T extends JComponent> extends JComponent implements View<T> {
	private static final long serialVersionUID = -3916651095354796037L;

	private List<T> views = new ArrayList<T>();
	
	public void addChild(T child) {
		views.add(child);
	}

	public void removeChild(T child) {
		views.remove(child);
	}

	@Override
	public List<T> getChildren() {
		return views;
	}
	
}
